//
//  UIView+JumpNumber.h
//  xieyingze
//
//  Created by xieyingze on 16/5/9.
//  Copyright © 2016年 xieyingze. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import <Foundation/Foundation.h>

@interface UIView (JumpNumber)


/**
 *  数字跳动
 *
 *  @param duration    跳动时间
 *  @param startNumber 开始数字
 *  @param endNumber   结束数字
 *  @param completion
 */
- (void)jumpNumberWithDuration:(int)duration
                    fromNumber:(float)startNumber
                      toNumber:(float)endNumber
                    completion:(void(^)(BOOL isFinished))completion;

/**
 *  数字跳动，默认动画时间3秒
 *
 *  @param startNumber 开始数字
 *  @param endNumber   结束数字
 *  @param completion  
 */
- (void)jumpNumberWithFromNumber:(float)startNumber
                      toNumber:(float)endNumber
                    completion:(void(^)(BOOL isFinished))completion;


/**
 *  字符跳动
 *
 *  @param duration   <#duration description#>
 *  @param startStr   <#startStr description#>
 *  @param endString  <#endString description#>
 *  @param completion <#completion description#>
 */
- (void)jumpNumberWithDuration:(int)duration
                    fromString:(NSString *)startStr
                      toString:(NSString *)endString
                    completion:(void(^)(BOOL isFinished))completion;

/**
 *  字符跳动
 *
 *  @param startStr   <#startStr description#>
 *  @param endString  <#endString description#>
 *  @param completion <#completion description#>
 */
- (void)jumpNumberWithFromString:(NSString *)startStr
                        toString:(NSString *)endString
                      completion:(void(^)(BOOL isFinished))completion;
@end
